package com.bjpowernode.web.resp.view;

import com.bjpowernode.api.dto.ProductBidInfo;
import com.bjpowernode.api.dto.ProductIncomeInfo;
import com.bjpowernode.util.CommonUtils;
import org.w3c.dom.html.HTMLDOMImplementation;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author 麦翔盛
 * @ClassName: ProductIncomeInfo
 * @description: 用户产品收益表
 * @date 2022/5/26 17:09
 */
public class ProductIncomeView implements Serializable {
    private String productName;
    private BigDecimal incomeMoney;
    private String incomeDate;

    public ProductIncomeView() {
    }

    public ProductIncomeView(ProductIncomeInfo productIncomeInfo) {
        this.productName = productIncomeInfo.getProductName();
        this.incomeMoney = productIncomeInfo.getIncomeMoney();
        if (productIncomeInfo.getIncomeDate()!=null){
            this.incomeDate = CommonUtils.formatDate(productIncomeInfo.getIncomeDate());
        }

    }
    public ProductIncomeView(String productName, BigDecimal incomeMoney, String incomeDate) {
        this.productName = productName;
        this.incomeMoney = incomeMoney;
        this.incomeDate = incomeDate;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public BigDecimal getIncomeMoney() {
        return incomeMoney;
    }

    public void setIncomeMoney(BigDecimal incomeMoney) {
        this.incomeMoney = incomeMoney;
    }

    public String getIncomeDate() {
        return incomeDate;
    }

    public void setIncomeDate(String incomeDate) {
        this.incomeDate = incomeDate;
    }
}
